package com.example.online.controller.shopController;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/shop")
public class ShopController {

    /**
     * 转至添加商品页面
     * @return
     */
    @GetMapping(value = "/shopadd")
    public String shopAdd(){
        return "shop/addshop";
    }
    /**
     * 转至商品重新编辑页面
     */
    @GetMapping(value = "/shopedit")
    public String shopEdit(){
        return "shop/shopedit";
    }
    /**
     * 转至用户已卖商品列表页面
     */
    @GetMapping(value = "/saledshoplist")
    public String SaledShopList(){
        return "shop/saledshoplist";
    }
    /**
     * 转至用户正在卖商品列表页面
     */
    @GetMapping(value = "/sellingshoplist")
    public String SellingShopList(){
        return "shop/sellingshoplist";
    }
    /**
     * 转至用户已买商品列表页面
     */
    @GetMapping(value = "/boughtshoplist")
    public String boughtShopList(){
        return "shop/boughtshoplist";
    }
    /**
     * 转至商品列表页面（在主页查询商品时）
     */
    @GetMapping(value = "/shoplist")
    public String shopList(){
        return "shop/shoplist";
    }
    /**
     * 查看单个商品详情时
     */
    @GetMapping(value = "/shopdetail")
    public String shopDetail(){
        return "shop/shopdetail";
    }
}
